package com.jml.生命周期003.processor.entity;


import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * @author:jml
 * @date: 2019/9/24 10:23
 * @description：InitializingBean相当于@Bena中的initmethod，
 */
@Component
public class MemberEntity生命周期基于接口 implements InitializingBean, DisposableBean {

	public MemberEntity生命周期基于接口() {
		System.out.println("无参数---构造");
	}

	//set方法全部走完了，才会走这个方法
	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("InitializingBean--->afterPropertiesSet");
	}

	@Override
	public void destroy() throws Exception {
		System.out.println("DisposableBean--->destroy");
	}
}
